package com.ymttest.database.model.mongo.query;


import java.math.BigDecimal;

import org.springframework.data.mongodb.core.mapping.Field;

import com.ymttest.database.model.annotation.Column;
import com.ymttest.database.model.annotation.Table;

/**
 * 资金信息
 * Created by zhangyifan on 2016/12/8.
 */
public class Fund {

    /**
     * fund
     * 付款金额
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfCash")
    @Field("paidCsh")
    private BigDecimal paidCash;

    /**
     * fund
     * 补款金额
     */
    @Table("Ymt_OrderState")
    @Column("fPostPaidAmountOfCash")
    @Field("ptCsh")
    private BigDecimal postCash;

    /**
     * fund
     * 退款金额
     */
    @Table("Ymt_OrderState")
    @Column("fRefundedAmountOfCash")
    @Field("rfdCsh")
    private BigDecimal refundCash;

    /**
     * fund
     * 付款平台优惠券
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfYmtCoupon")
    @Field("ymtCop")
    private BigDecimal ymtCoupon;

    /**
     * fund
     * 付款卖家优惠券
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfSellerCoupon")
    @Field("sellerCop")
    private BigDecimal sellerCoupon;

    /**
     * fund
     * 付款三方折扣
     */
    @Table("Ymt_OrderState")
    @Column("fDiscountOfThirdParty")
    @Field("disc3P")
    private BigDecimal discount3P;

    /**
     * fund
     * 付款红包
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfGift")
    @Field("paidGif")
    private BigDecimal paidGif;

    /**
     * fund
     * 补款红包
     */
    @Table("Ymt_OrderState")
    @Column("fPostPaidAmountOfGift")
    @Field("ptGif")
    private BigDecimal postGif;

    /**
     * fund
     * 退款红包
     */
    @Table("Ymt_OrderState")
    @Column("fRefundedAmountOfGift")
    @Field("rfdGif")
    private BigDecimal refundGif;

    /**
     * fund
     * 免运卡
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfFreeCard")
    @Field("paidFC")
    private BigDecimal paidFreeCard;

    /**
     * fund
     * 退款优惠券
     */
    @Table("Ymt_OrderState")
    @Column("fRefundedAmountOfCoupon")
    @Field("rfdCop")
    private BigDecimal refundCoupon;

    /**
     * fund
     * 退款三方折扣
     */
    @Table("Ymt_OrderState")
    @Column("fRefundedDiscountOfThirdParty")
    @Field("rfdDisc3P")
    private BigDecimal refundDiscount3P;

    /**
     * fund
     * 第三方付款
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfThirdParty")
    @Field("paid3P")
    private BigDecimal paid3P;

    /**
     * fund
     * 余额付款
     */
    @Table("Ymt_OrderState")
    @Column("fPaidAmountOfYmtAccount")
    @Field("paidAcc")
    private BigDecimal paidAccount;

    public BigDecimal getPaidCash() {
        return paidCash;
    }

    public void setPaidCash(BigDecimal paidCash) {
        this.paidCash = paidCash;
    }

    public BigDecimal getPostCash() {
        return postCash;
    }

    public void setPostCash(BigDecimal postCash) {
        this.postCash = postCash;
    }

    public BigDecimal getRefundCash() {
        return refundCash;
    }

    public void setRefundCash(BigDecimal refundCash) {
        this.refundCash = refundCash;
    }

    public BigDecimal getYmtCoupon() {
        return ymtCoupon;
    }

    public void setYmtCoupon(BigDecimal ymtCoupon) {
        this.ymtCoupon = ymtCoupon;
    }

    public BigDecimal getSellerCoupon() {
        return sellerCoupon;
    }

    public void setSellerCoupon(BigDecimal sellerCoupon) {
        this.sellerCoupon = sellerCoupon;
    }

    public BigDecimal getDiscount3P() {
        return discount3P;
    }

    public void setDiscount3P(BigDecimal discount3P) {
        this.discount3P = discount3P;
    }

    public BigDecimal getPaidGif() {
        return paidGif;
    }

    public void setPaidGif(BigDecimal paidGif) {
        this.paidGif = paidGif;
    }

    public BigDecimal getPostGif() {
        return postGif;
    }

    public void setPostGif(BigDecimal postGif) {
        this.postGif = postGif;
    }

    public BigDecimal getRefundGif() {
        return refundGif;
    }

    public void setRefundGif(BigDecimal refundGif) {
        this.refundGif = refundGif;
    }

    public BigDecimal getPaidFreeCard() {
        return paidFreeCard;
    }

    public void setPaidFreeCard(BigDecimal paidFreeCard) {
        this.paidFreeCard = paidFreeCard;
    }

    public BigDecimal getRefundCoupon() {
        return refundCoupon;
    }

    public void setRefundCoupon(BigDecimal refundCoupon) {
        this.refundCoupon = refundCoupon;
    }

    public BigDecimal getRefundDiscount3P() {
        return refundDiscount3P;
    }

    public void setRefundDiscount3P(BigDecimal refundDiscount3P) {
        this.refundDiscount3P = refundDiscount3P;
    }

    public BigDecimal getPaidAccount() {
        return paidAccount;
    }

    public void setPaidAccount(BigDecimal paidAccount) {
        this.paidAccount = paidAccount;
    }

    public BigDecimal getPaid3P() {
        return paid3P;
    }

    public void setPaid3P(BigDecimal paid3P) {
        this.paid3P = paid3P;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Fund)) return false;

        Fund fund = (Fund) o;

        if (getPaidCash() != null ? !getPaidCash().equals(fund.getPaidCash()) : fund.getPaidCash() != null)
            return false;
        if (getPostCash() != null ? !getPostCash().equals(fund.getPostCash()) : fund.getPostCash() != null)
            return false;
        if (getRefundCash() != null ? !getRefundCash().equals(fund.getRefundCash()) : fund.getRefundCash() != null)
            return false;
        if (getYmtCoupon() != null ? !getYmtCoupon().equals(fund.getYmtCoupon()) : fund.getYmtCoupon() != null)
            return false;
        if (getSellerCoupon() != null ? !getSellerCoupon().equals(fund.getSellerCoupon()) : fund.getSellerCoupon() != null)
            return false;
        if (getDiscount3P() != null ? !getDiscount3P().equals(fund.getDiscount3P()) : fund.getDiscount3P() != null)
            return false;
        if (getPaidGif() != null ? !getPaidGif().equals(fund.getPaidGif()) : fund.getPaidGif() != null) return false;
        if (getPostGif() != null ? !getPostGif().equals(fund.getPostGif()) : fund.getPostGif() != null) return false;
        if (getRefundGif() != null ? !getRefundGif().equals(fund.getRefundGif()) : fund.getRefundGif() != null)
            return false;
        if (getPaidFreeCard() != null ? !getPaidFreeCard().equals(fund.getPaidFreeCard()) : fund.getPaidFreeCard() != null)
            return false;
        if (getRefundCoupon() != null ? !getRefundCoupon().equals(fund.getRefundCoupon()) : fund.getRefundCoupon() != null)
            return false;
        if (getRefundDiscount3P() != null ? !getRefundDiscount3P().equals(fund.getRefundDiscount3P()) : fund.getRefundDiscount3P() != null)
            return false;
        if (getPaid3P() != null ? !getPaid3P().equals(fund.getPaid3P()) : fund.getPaid3P() != null) return false;
        if (getPaidAccount() != null ? !getPaidAccount().equals(fund.getPaidAccount()) : fund.getPaidAccount() != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = getPaidCash() != null ? getPaidCash().hashCode() : 0;
        result = 31 * result + (getPostCash() != null ? getPostCash().hashCode() : 0);
        result = 31 * result + (getRefundCash() != null ? getRefundCash().hashCode() : 0);
        result = 31 * result + (getYmtCoupon() != null ? getYmtCoupon().hashCode() : 0);
        result = 31 * result + (getSellerCoupon() != null ? getSellerCoupon().hashCode() : 0);
        result = 31 * result + (getDiscount3P() != null ? getDiscount3P().hashCode() : 0);
        result = 31 * result + (getPaidGif() != null ? getPaidGif().hashCode() : 0);
        result = 31 * result + (getPostGif() != null ? getPostGif().hashCode() : 0);
        result = 31 * result + (getRefundGif() != null ? getRefundGif().hashCode() : 0);
        result = 31 * result + (getPaidFreeCard() != null ? getPaidFreeCard().hashCode() : 0);
        result = 31 * result + (getRefundCoupon() != null ? getRefundCoupon().hashCode() : 0);
        result = 31 * result + (getRefundDiscount3P() != null ? getRefundDiscount3P().hashCode() : 0);
        result = 31 * result + (getPaid3P() != null ? getPaid3P().hashCode() : 0);
        result = 31 * result + (getPaidAccount() != null ? getPaidAccount().hashCode() : 0);
        return result;
    }
}
